<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>${title }</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css"
	rel="stylesheet">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/assets/css/styles.css" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/assets/countdown/jquery.countdown.css" />
<link
	href="${pageContext.request.contextPath}/css/bootstrap.min14ed.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/style.min.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/style.min862f.css"
	rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/validate.js"></script>
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="assets/countdown/jquery.countdown.js"></script>
<!-- <script src="assets/js/script.js"></script>
 -->
<script type="text/javascript">
	$(function() {

		var note = $('#note'), ts = new Date(${date}), newYear = true;

		if ((new Date()) > ts) {
			// The new year is here! Count towards something else.
			// Notice the *1000 at the end - time must be in milliseconds
			ts = (new Date()).getTime() + 10 * 24 * 60 * 60 * 1000;
			newYear = false;
		}

		$('#countdown').countdown(
				{
					timestamp : ts,
					callback : function(days, hours, minutes, seconds) {

						var message = "";

						message += days + " day" + (days == 1 ? '' : 's')
								+ ", ";
						message += hours + " hour" + (hours == 1 ? '' : 's')
								+ ", ";
						message += minutes + " minute"
								+ (minutes == 1 ? '' : 's') + " and ";
						message += seconds + " second"
								+ (seconds == 1 ? '' : 's') + " <br />";

						if (newYear) {
							message += "left until the new year!";
						} else {
							message += "left to 10 days from now!";
						}

						note.html(message);
					}
				});

	});
</script>
</head>
<body background="${pageContext.request.contextPath}/image/bg.jpg">

	<div class="col-md-12" align="center" style="left:25%; width: 50%">
		<div style="opacity=0;">
			<div id="countdown"></div>
		</div>
		<h2 style="margin-bottom: 20px">${title }</h2>
		<marquee behavior="scroll" style="font-size: 2.2em">${info}</marquee>
		<form action="${pageContext.request.contextPath}/student/regist" method="post">
			<div class="form-group">
				<label class="col-sm-3 control-label">学号：</label>
				<div class="col-sm-7">
					<input type="text" id="number" name="number" class="form-control"
						placeholder="请输入11位学号" value="${ user.number}"> <span
						class="help-block m-b-none" style="color: red;">${map.number}</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">姓名：</label>
				<div class="col-sm-7">
					<input type="text" name="name" id="name" class="form-control"
						placeholder="姓名" value="${ user.name}"> <span
						class="help-block m-b-none " style="color: red;">${map.name}</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">手机号：</label>
				<div class="col-sm-7">
					<input type="text" name="phone" id="phone" class="form-control"
						placeholder="请输入11位手机号" value="${ user.phone}"> <span
						class="help-block m-b-none" style="color: red;">${map.phone}</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">QQ号：</label>
				<div class="col-sm-7">
					<input type="text" name="qq" id="qq" class="form-control"
						placeholder="QQ号" value="${ user.qq}"> <span
						class="help-block m-b-none" style="color: red;">${map.qq}</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">专业：</label>
				<div class="col-sm-7">
					<input type="text" name="major" id="major" class="form-control"
						placeholder="请输入专业名称" value="${ user.major}"> <span
						class="help-block m-b-none" style="color: red;">${map.major}</span>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">学院：</label>
				<div class="col-sm-7">
					<select class="form-control" name="college" id="college">
						<option <c:if test="${user.college eq '计算机工程学院'}">selected</c:if>
							value="计算机工程学院">计算机工程学院</option>
						<option
							<c:if test="${user.college eq '机电与车辆工程学院'}">selected</c:if>
							value="机电与车辆工程学院">机电与车辆工程学院</option>
						<option
							<c:if test="${user.college eq '信息与控制工程学院'}">selected</c:if>
							value="信息与控制工程学院">信息与控制工程学院</option>
						<option <c:if test="${user.college eq '经济管理学院'}">selected</c:if>
							value="经济管理学院">经济管理学院</option>
						<option
							<c:if test="${user.college eq '物理与光电工程学院'}">selected</c:if>
							value="物理与光电工程学院">物理与光电工程学院</option>
						<option
							<c:if test="${user.college eq '数学与信息科学学院'}">selected</c:if>
							value="数学与信息科学学院">数学与信息科学学院</option>
						<option
							<c:if test="${user.college eq '化学化工与环境工程学院'}">selected</c:if>
							value="化学化工与环境工程学院">化学化工与环境工程学院</option>
						<option
							<c:if test="${user.college eq '生物与农业工程学院'}">selected</c:if>
							value="生物与农业工程学院">生物与农业工程学院</option>
						<option
							<c:if test="${user.college eq '文学与新闻传播学院'}">selected</c:if>
							value="文学与新闻传播学院">文学与新闻传播学院</option>
						<option <c:if test="${user.college eq '外国语学院'}">selected</c:if>
							value="外国语学院">外国语学院</option>
						<option <c:if test="${user.college eq '法学院'}">selected</c:if>
							value="法学院">法学院</option>
						<option
							<c:if test="${user.college eq '历史文化与旅游学院'}">selected</c:if>
							value="历史文化与旅游学院">历史文化与旅游学院</option>
						<option <c:if test="${user.college eq '音乐学院'}">selected</c:if>
							value="音乐学院">音乐学院</option>
						<option <c:if test="${user.college eq '美术学院'}">selected</c:if>
							value="美术学院">美术学院</option>
						<option <c:if test="${user.college eq '体育学院'}">selected</c:if>
							value="体育学院">体育学院</option>
						<option <c:if test="${user.college eq '教师教育学院'}">selected</c:if>
							value="教师教育学院">教师教育学院</option>
						<option <c:if test="${user.college eq '歌尔科技学院'}">selected</c:if>
							value="歌尔科技学院">歌尔科技学院</option>
						<option <c:if test="${user.college eq '建筑工程学院'}">selected</c:if>
							value="建筑工程学院">建筑工程学院</option>
						<option <c:if test="${user.college eq '北海国际学院'}">selected</c:if>
							value="北海国际学院">北海国际学院</option>
						<option <c:if test="${user.college eq '幼教特教师范学院'}">selected</c:if>
							value="幼教特教师范学院">幼教特教师范学院</option>
						<option <c:if test="${user.college eq '马克思主义学院'}">selected</c:if>
							value="马克思主义学院">马克思主义学院</option>
						<option <c:if test="${user.college eq '传媒学院'}">selected</c:if>
							value="传媒学院">传媒学院</option>
						<option
							<c:if test="${user.college eq '北海国际学院（歌尔科技学院）'}">selected</c:if>
							value="北海国际学院（歌尔科技学院）">北海国际学院（歌尔科技学院）</option>
						<option <c:if test="${user.college eq '其他'}">selected</c:if>
							value="其他">其他</option>
					</select>
				</div>
				<span class="help-block m-b-none" style="color: red;">${map.college }</span>
			</div>


			<div class="form-group">
				<label class="col-sm-3 control-label">验证码：</label>
				<div class="col-sm-4">
					<input type="text" id="vcode" name="vcode" size="8" /> <img
						src="vcode" title="看不清，点击换一张试试"
						onClick="this.src=this.src+'?'" /> <span
						class="help-block m-b-none" style="color: red;">${map.valcode}</span>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 col-sm-offset-2">
					<button class="btn btn-primary" type="button" onclick="checkUser()">提&nbsp;&nbsp;&nbsp;交</button>
				</div>
			</div>
		</form>
	</div>
</body>
</html>
